package windbell.domain.risk;

import edu.fudan.mylang.pf.EntityImplementation;
import edu.fudan.mylang.pf.IModelObject;
import java.util.Collection;
import java.util.Date;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import windbell.domain.risk.RiskCheckItem;
import windbell.domain.risk.RiskCheckSource;
import windbell.domain.risk.RiskCheckStatus;
import windbell.domain.risk.RiskCheckTarget;
import windbell.domain.risk.RiskCheckTemplate;
import windbell.domain.risk.impl.RiskCheckImpl;
import windbell.domain.risk.proxy.RiskCheckProxy;

@EntityImplementation(implementBy = RiskCheckImpl.class)
public interface RiskCheck extends IModelObject {
  public abstract RiskCheckTarget getCheckTarget();
  
  public abstract RiskCheck setCheckTarget(final RiskCheckTarget checkTarget);
  
  public abstract RiskCheckSource getSource();
  
  public abstract RiskCheck setSource(final RiskCheckSource source);
  
  public abstract Collection<RiskCheckItem> getCheckItems();
  
  public abstract RiskCheckItem createAndAddtoCheckItems();
  
  public abstract RiskCheckItem createAndAddtoCheckItems(final Procedure1<RiskCheckItem> updater);
  
  public abstract RiskCheck removeFromCheckItems(final RiskCheckItem riskCheckItem);
  
  public abstract RiskCheck removeAllCheckItems();
  
  public abstract Date getStartDate();
  
  public abstract RiskCheck setStartDate(final Date startDate);
  
  public abstract Date getDueDate();
  
  public abstract RiskCheck setDueDate(final Date dueDate);
  
  public abstract Date getFinishDate();
  
  public abstract RiskCheck setFinishDate(final Date finishDate);
  
  public abstract void checkValid();
  
  public abstract RiskCheckStatus getStatus();
  
  public abstract void start();
  
  public abstract void createItemsFromTemplate(final RiskCheckTemplate template);
  
  public abstract void publish(final Date date);
  
  public abstract void $itemFinished();
  
  public abstract Boolean isCreated();
  
  public abstract Boolean isChecking();
  
  public abstract Boolean isFinished();
  
  public abstract RiskCheckProxy toProxy();
}
